/*jslint browser: true, devel: true, bitwise: true, white: true, plusplus: true, forin:true, nomen:true */
/*global $:true, define:true */

/**
 * @module Test
 */

define(['WID/Test/Matcher'],function(Matcher) {
"use strict";

function toBeInstanceOf() {
} var extend = Object.create(Matcher.prototype);extend.constructor = toBeInstanceOf;

extend.getName = function() {
	return 'toBeInstanceOf';
};

extend.match = function(target, negation, exp) {
	return (negation)?!(target instanceof exp):target instanceof exp;
};

extend.getInfo = function(target, negation, exp) {
	return Matcher.prototype.getInfo.call(this,target,negation,exp)+'to be instance of '+Matcher.toPrimitive(exp);
};
 
toBeInstanceOf.prototype = extend;
return toBeInstanceOf;
});

/*
 
 toBeInstanceOf: function(object) {
		if (!( (this.Negation)?
					!(this.Target instanceof object):
					(this.Target instanceof object) )) {
			this.logFailure(this.createInfo(
				this.Target.constructor.name+' < '+this.toPrimitive(this.Target)+' >',
				Matchers.MsgConnectors.toBeInstanceOf,object.name));
		}
	},
 */